Skip to content

Added TIMESTAMP_NTZ type support with precision to Snowflake dialect#2080

Merged
iffyio merged 1 commit intoapache:mainfrom
romanoff:add_optional_precision_parameter_to_snowflake_timestamp_variations
Oct 30, 2025
Merged

Added TIMESTAMP_NTZ type support with precision to Snowflake dialect#2080
iffyio merged 1 commit intoapache:mainfrom
romanoff:add_optional_precision_parameter_to_snowflake_timestamp_variations

Conversation

@romanoff
Copy link
Copy Markdown
Contributor

Adding support for optional precision for TIMESTAMP_NTZ type in snowflake. Example: TIMESTAMP_NTZ(9)
It's supported in spec: https://docs.snowflake.com/en/sql-reference/data-types-datetime
Specifically

All timestamp variations, as well as the TIMESTAMP alias, support an optional precision parameter for
fractional seconds (for example, TIMESTAMP(3)). Timestamp precision can range from 0 (seconds) 
to 9 (nanoseconds). The default precision is 9.

Example of sql:

SELECT CAST(TO_CHAR(CURRENT_DATE, 'YYYY-MM-DD')||' 01:00:00' AS TIMESTAMP_NTZ(9))

Copy link
Copy Markdown
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @romanoff!

@iffyio iffyio added this pull request to the merge queue Oct 30, 2025
Merged via the queue into apache:main with commit bc6e1d6 Oct 30, 2025
10 checks passed
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants